import Relay from "react-relay";

export default class sampleExamineServerMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { sampleExamineServer  }`;
    }

    getVariables() {
        return {
            argsInput: {
                action:this.props.action,
                scId:this.props.scId,
                sampleId:this.props.sampleId,
                gspIds:this.props.gspIds,
                logisticsInfo:this.props.logisticsInfo,
                examineUser:this.props.examineUser,
                result:this.props.result,
                fileJSON:this.props.fileJSON,
                explainDesc:this.props.explainDesc,
                approveType: this.props.approveType
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on sampleExamineServerPayload {
            responseData {
                errorCode    
                totalResult   
                approveType 
                partAName
                partBName
                goodsSamplePlan{
                    gId
                    examineList{
                        gspId
                        createDate
                        examineUser  
                        version
                        explainDesc
                        fileJSON
                        examineDate
                        edId
                        gId
                        result
                    }
                    size
                    sampleId
                    num
                    styleNo
                    logisticsInfo
                    gspId
                    scId
                    productName
                    startDate
                    status
                }
                historyList{
                    examineUser
                    examineCompany
                    version
                    gspId 
                    createDate 
                    result 
                    gId 
                    edId 
                    explainDesc 
                    fileJSON 
                    examineDate 
                }
                authorityId 
                goodsSamplePlanlList{
                    gId
                    examineList{
                        gspId
                        createDate
                        examineUser
                        examineCompany
                        version
                        explainDesc
                        fileJSON
                        examineDate
                        edId
                        gId
                        result
                    }
                    size
                    sampleId
                    num
                    styleNo
                    logisticsInfo
                    gspId
                    scId
                    productName
                    startDate
                    status
                    reply 
                    off
                    isReStart
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on sampleExamineServerPayload {
                    responseData {
                        errorCode    
                        totalResult   
                        approveType 
                        partAName
                        partBName
                        goodsSamplePlan{
                            gId
                            examineList{
                                gspId
                                createDate
                                examineUser  
                                version
                                explainDesc
                                fileJSON
                                examineDate
                                edId
                                gId
                                result
                            }
                            size
                            sampleId
                            num
                            styleNo
                            logisticsInfo
                            gspId
                            scId
                            productName
                            startDate
                            status
                        }
                        historyList{
                            examineUser
                            version
                            gspId 
                            createDate 
                            examineCompany
                            result 
                            gId 
                            edId 
                            explainDesc 
                            fileJSON 
                            examineDate 
                        }
                        authorityId 
                        goodsSamplePlanlList{
                            gId
                            examineList{
                                gspId
                                createDate
                                examineUser
                                examineCompany
                                version
                                explainDesc
                                fileJSON
                                examineDate
                                edId
                                gId
                                result
                            }
                            size
                            sampleId
                            num
                            styleNo
                            logisticsInfo
                            gspId
                            scId
                            productName
                            startDate
                            status
                            reply
                            off
                            isReStart
                        }
                    }
                }
            `]
        }];
    }

}